package com.tubi.static1;

public class TestStatic {
    /*
        1。被static 修饰的成员，会被该类的所有对象共享
        2。被static 修饰的成员，会随着类的加载而加载 优先于对象存在
        3。多了一个调用方式可以根据类名.（点）进行调用
     */


    private String name1;

    public static void main(String[] args) {
        Student st = new Student();
        st.setName("荣磊");
        st.setAge(23);
        Student.school = "static 点进行调用";
//        st.school = " buzhidao";
        st.show();

        Student st1 = new Student();
        st1.show();

        TestStatic sw = new TestStatic();
        sw.name1="111";
        System.out.println(sw.name1);

    }
}
